package com.joven.shelltest.annotation;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.joven.shelltest.utils.desensitized.SensitiveSimpleSerializer;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 自定义脱敏
 * @Author wzj
 * @Date 2023-09-04 09:22
 **/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveSimpleSerializer.class)
public @interface SensitiveSimple {


    int start() default 0 ;

    int end() default 0 ;

    String mask() default "*" ;
}
